<template>
  <div class="hello">
    <h1>{{ msg }}</h1>
    <h2 @click="getmsg()">Essential Links</h2>
    <h2>{{swiperHieght}}</h2>
    <h2>{{this.$store.state.count}}</h2>
    <h2 @click="increment()"><input type="button" value="button"></h2>
    <h2 @click="mymsg()"><input class="btn" type="button" value="msg"></h2>
     <h2 @click="popup()"><input class="popup" type="button" value="popup"></h2>
    <ul>
      <li>
        <a href="https://vuejs.org" target="_blank">
          Core Docs
        </a>
      </li>
      <li>
        <a href="https://forum.vuejs.org" target="_blank">
          Forum
        </a>
      </li>
      <li>
        <a href="https://chat.vuejs.org" target="_blank">
          Community Chat
        </a>
      </li>
      <li>
        <a href="https://twitter.com/vuejs" target="_blank">
          Twitter
        </a>
      </li>
      <br />
      <li>
        <a href="http://vuejs-templates.github.io/webpack/" target="_blank">
          Docs for This Template
        </a>
      </li>
    </ul>
    <ul>
      <li>
        <a href="http://router.vuejs.org/" target="_blank">
          vue-router
        </a>
      </li>
      <li>
        <a href="http://vuex.vuejs.org/" target="_blank">
          vuex
        </a>
      </li>
      <li>
        <a href="http://vue-loader.vuejs.org/" target="_blank">
          vue-loader
        </a>
      </li>
      <li>

      </li>
    </ul>

    <!-- <List></List> -->

  </div>
</template>

<script>
// import List from './List.vue'
import { mapActions } from 'vuex'
export default {
  name: 'add',
  data () {
    return {
      msg: '',
      msgList: []

    }
  },
  props: ['swiperHieght'],
  // components: { List },
  methods: {
    getmsg () {
      this.$emit('getmsg', this.msg)
    },
    ...mapActions(['increment']),
    mymsg () {
      this.$message({ type: 'success', text: 11111 })
    },
    fn () {

    },
    popup () {
      this.$popup({
        project: 'pharmacist', // pharmacist 药师 |doctor 医师| nurse 护师
        title: '我是标题',
        content: '我是内容我是内容我是内容我是内容',
        btnText: '我是按钮'
      })
      this.$popup({
        project: 'doctor', // pharmacist 药师 |doctor 医师| nurse 护师
        title: '我是标题',
        content: '我是内容我是内容我是内容我是内容',
        btnText: '我是按钮'
      })
      this.$popup({
        project: 'nurse', // pharmacist 药师 |doctor 医师| nurse 护师
        title: '我是标题',
        content: '我是内容我是内容我是内容我是内容',
        btnText: '我是按钮'
      })
    }
  },
  mounted () {

  },
  created () {
    setTimeout(() => {
      this.msg = 'abc'
    }, 500)
  },
  computed: {

  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1,
h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
.btn {
  position: fixed;
  bottom: 20px;
}
.popup{
  position: fixed;
  bottom: 40px;
}

</style>
